mydat <- data.frame(x1=c(2,2,3,3,1,1),
                    x2=c(0.3,1,2.1,2.2,0.1,0.2),
                    x3=c(0.01,0.11,0.04,0.02,0.1,0.06))
write.table(mydat,file='out.txt',
            row.names=FALSE,col.names=FALSE,sep=',')

cat('Test file\n',round(rnorm(5),3),'\n',file='test.txt')

line <- c('Count down',paste(rev(1:10),collapse='-'),'Go')
writeLines(line,con='test2.txt')

sink('test3.txt')
x <- 1:5
y <- 1:3
outer(x,y)
sink()
